home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11351 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  650 b 

  1. Path: iz.maus.de!Torsten_Landschoff
  2. From: Torsten_Landschoff@iz.maus.de (Torsten Landschoff)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: GNU question
  5. Message-ID: <199603130938.a35758@iz.maus.de>
  6. Date: Wed, 13 Mar 96 07:38:00 GMT
  7. References: <Pine.SOL.3.91-941213.960312113456.29919A-100000@deneb.dur.ac.uk>
  8. X-Gate: MausGate/News 1.25/ac3
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset=ISO-8859-1
  11. Content-Transfer-Encoding: 8bit
  12.  
  13. Hi Matthew
  14.  
  15. MS>randomize();            // seed random number generator
  16.  
  17. This function is not available in Gnu C. You should use srand( time(NULL) )
  18. instead.
  19.  
  20. MS>r = random(lines);
  21.  
  22. Use r = rand() % lines;
  23.  
  24. cu
  25.     Torsten
  26.